home *** CD-ROM | disk | FTP | other *** search
-
-
-
- DDDDIIIIFFFFFFFF3333((((1111)))) DDDDIIIIFFFFFFFF3333((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- diff3 - 3-way differential file comparison
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ddddiiiiffffffff3333 [ ----eeeexxxxEEEEXXXX3333 [----iiii | ----mmmm] [----LLLL label1 ----LLLL label3] ] file1 file2 file3
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _D_i_f_f_3 compares three versions of a file, and publishes disagreeing ranges
- of text flagged with these codes:
-
- ==== all three files differ
-
- ====1 _f_i_l_e_1 is different
-
- ====2 _f_i_l_e_2 is different
-
- ====3 _f_i_l_e_3 is different
-
- The type of change suffered in converting a given range of a given file
- to some other is indicated in one of these ways:
-
- _f :::: _n_1 aaaa Text is to be appended after line number _n_1 in file _f,
- where _f = 1, 2, or 3.
-
- _f :::: _n_1 ,,,, _n_2 cccc Text is to be changed in the range line _n_1 to line _n_2.
- If _n_1 = _n_2, the range may be abbreviated to _n_1.
-
- The original contents of the range follows immediately after a cccc
- indication. When the contents of two files are identical, the contents
- of the lower-numbered file is suppressed.
-
- The ----mmmm option produces a merge script on the output of _d_i_f_f_3. If none of
- ----eeeeEEEExxxxXXXX3333 is specified along with ----mmmm, then the format of option ----EEEE is
- presumed. If the ----mmmm option is used, then binary files, files without
- trailing newline, and files with excessively long lines can be
- successfully merged.
-
- If no ----mmmm option is specified, then under the ----eeee option, _d_i_f_f_3 publishes a
- script for the editor _e_d(1) that will incorporate into _f_i_l_e_1 all changes
- between _f_i_l_e_2 and _f_i_l_e_3, _i._e. the changes that normally would be flagged
- ==== and ====3. Option ----xxxx (----3333) produces a script to incorporate only
- changes flagged ==== (====3). The following command will apply the
- resulting script to `file1', and emit the result on the output stream.
-
- (cat script; echo '1,$p') | ed - file1
-
- The ----EEEE and ----XXXX are similar to ----eeee and ----xxxx, respectively, but treat
- overlapping changes (i.e., changes that would be flagged with ==== in the
- normal listing) differently. The overlapping lines from both files will
- be inserted by the edit script, bracketed by "<<<<<<" and ">>>>>>" lines.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- DDDDIIIIFFFFFFFF3333((((1111)))) DDDDIIIIFFFFFFFF3333((((1111))))
-
-
-
- For example, suppose lines 7-8 are changed in both file1 and file3. The
- merged output of the command
-
- "diff3 -m file1 file2 file3"
- contains:
-
- lines 1-6 of file1
- <<<<<<< file1
- lines 7-8 of file1
- =======
- lines 7-8 of file3
- >>>>>>> file3
- rest of file1
-
- If there are overlaps, the user should edit the result and delete one of
- the alternatives. If the ----LLLL _l_a_b_e_l_1 and ----LLLL _l_a_b_e_l_3 options are given, the
- labels are output in place of the names _f_i_l_e_1 and _f_i_l_e_3 in overlap
- reports.
-
- If the option ----iiii is specified along with one of the options ----eeeexxxxEEEEXXXX3333, then
- the resulting edit script has the editor commands
-
- w
- q
-
- added at the end. Then the following command will update `file1' in
- place with the changes.
-
- ed - file1 < script
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- diff(1), ed(1).
-
- BBBBUUUUGGGGSSSS
- If merges are done by generating explicit scripts to input to the editor,
- rather than by using the ----mmmm option, the merge is limited by the
- capabilities of the editor _e_d(1). The editor cannot handle excessively
- long lines, binary files (with nul bytes) or files without a trailing
- newline.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- An exit status of 0 means _d_i_f_f_3 was successful, 1 means some overlaps
- were found, and 2 means trouble.
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-